package d0325;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class DateTimeFormatter {
    /*public static void main(String[] args) {
        DateTimeFormatter dtf1=DateTimeFormatter.ofPattern("yyyy/MM/dd");
        DateTimeFormatter dtf2=DateTimeFormatter.ofPattern("hh时mm分ss秒");
        DateTimeFormatter dtf3=DateTimeFormatter.ofPattern("yyyy/MM/dd hh时mm分ss秒");
        LocalDate date=LocalDate.now();
        LocalTime time=LocalTime.now();
        LocalDateTime datetime=LocalDateTime.now();
        System.out.println(date.format(dtf1));
        System.out.println(time.format(dtf2));
        System.out.println(datetime.format(dtf3));

        String str1="2001/12/03";
        String str2="12时23分34秒";
        String str3="2001/12/03 12时23分34秒";
        LocalDate date2=LocalDate.parse(str1,dtf1);
        LocalTime time2=LocalTime.parse(str2,dtf2);
        LocalDateTime datetime2=LocalDateTime.parse(str3,dtf3);


    }*/
}
